<template>
	<div class="page">
		<v-front-header></v-front-header>
		<div id="nav" style="margin-bottom:10px; height:631px;width:100%">
			<el-row :gutter="10">
				<el-col :span="14">
					<div style="height:100%;magin-left:30px">
						<h2 style="width: 100%;display: flex;justify-content: center;align-items: center;padding-top:50px;padding-bottom:30px">{{news.news_title}}</h2>
						<span style="width: 100%;display: flex;padding-left:60px;padding-right:40px;" v-html="news.content">
						</span>
					</div>
				</el-col>
				<el-col :span="10">
					<div style="width: 100%;padding-left:120px;padding-top:40px">
						<div style="align-items:center">
							<div style>
								<p>记者：{{news.iss_user}}</p>
							</div>
						</div>
					</div>
				</el-col>
			</el-row>
		</div>
		<v-front-bottom></v-front-bottom>
	</div>
</template>

<script>
	import {
		fetchData
	} from '../../api/index';
	import {
		getRequest
	} from '../../api/index';
	import {
		postRequest
	} from '../../api/index';
	import vFrontHeader from '../common/FrontHeader';
	import vFrontBottom from '../common/FrontBottom';
	export default {
		name: 'NewsDetail',
		data: function() {
			return {
				news: {},
				news_id: 7,
				n_name: {},
				c_name: {}
			};
		},
		components: {
			vFrontHeader,
			vFrontBottom,
		},
		created() {
			this.news_id = Number(this.$route.query.news_id);
			this.getnewssDetailData();
		},
		methods: {
			getnewssDetailData() {
				// TODO 接口请求
				getRequest('/public/news/getdetail', {
					news_id: this.news_id
				}).then(res => {
					console.log('详情接口');
					this.news = res.data;
					console.log(this.news);
				});
			}
		}
	};
</script>
<style>
	html, body, #app, .wrapper{
		width: 100%;
		height: 100%;
		/* overflow: scroll; */
	}
    .page {
        height: 100%;
    }
</style>